<?php

function smarty_modifier_mstring_format($string, $format)
{
	if (!is_array($string) && !eregi('^@', $string))
	{
		return sprintf($format, $string);
	}
	
	elseif (is_array($string))
	{
		return vsprintf($format, $string);
	}
	
	else
	{
		$string = substr($string, 1, strlen($string));
		return vsprintf($format, explode(',', $string));
	}
}

?>
